<!DOCTYPE html>
<html lang="zh-CN">
<head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width,initial-scale=1.0">
        <title>人事管理</title>
        <link rel="icon" href="{{ url_for('static',filename='favicon.ico') }}" >
		<link href="{{ url_for('static',filename='bootstrap.min.css') }}" rel="stylesheet">
		<link href="{{ url_for('static',filename='amaze.css') }}" rel="stylesheet" >
        <link href="{{ url_for('static',filename='style.css') }}" rel="stylesheet" >
        <style>
            .ti-widget,.ti-panel{
                font-style:normal;
            }
        </style>
        <script type="text/javascript" src="{{ url_for('static',filename='jquery-3.1.1.min.js') }}"></script>
        <script type="text/javascript" src="{{ url_for('static',filename='Chart.js') }}"></script>
        <script src="http://cdn.bootcss.com/jquery/1.11.0/jquery.min.js" ></script>
        <script src="{{ url_for('static',filename='jquery.table2excel.js') }}"></script>
        <script>
            $(document).ready(function () {
                var time = new Date();
                var day = ("0" + time.getDate()).slice(-2);
                var month = ("0" + (time.getMonth() + 1)).slice(-2);
                var today = time.getFullYear() + "-" + (month) + "-" + (day);
                $('#date_info_end').val(today);
            })
            $(document).ready(function () {
                var time = new Date();
                var day = ("0" + time.getDate()).slice(-2);
                var month = ("0" + (time.getMonth() + 1)).slice(-2);
                var today = time.getFullYear()-1 + "-" + (month) + "-" + (day);
                $('#date_info_start').val(today);
            })
        </script>
        <script>        $('input[required="required"]').before('<span style="color:red">*</span>');    </script>
{#        <link href="{{ url_for('static',filename='themify-icons.css') }}" rel="stylesheet" >#}

</head>
<body>
    {% for message in get_flashed_messages() %}
    <script rel="script">
        //弹出一个对话框
        alert("{{ message }}");
    </script>
{% endfor %}
{# 获取提示消息并显示 #}
{% block body %}
    
    <div class="wrapper" style="height: auto">
		<div class="sidebar" data-background-color="brown" data-active-color="danger">
	    <!--
			Tip 1: you can change the color of the sidebar's background using: data-background-color="white | brown"
			Tip 2: you can change the color of the active button using the data-active-color="primary | info | success | warning | danger"
		-->
			{% if current_user.is_authenticated %}
            <div class="logo">
                <a href="#" class="simple-text">
                    人事管理
                </a>
            </div>
            {% else %}
			<div class="logo">
                <a href="#" class="simple-text">
                    请登录系统
                </a>
            </div>
			{% endif %}
            <div class="sidebar-wrapper">
				<ul class="nav">
                    <li>
                        <a href="{{ url_for('index') }}">
                            <i class="ti-panel">&#9818</i>
                            <p>首页</p>
                        </a>
                    </li>
					{% if current_user.is_authenticated %}
                        <li>
							<a href="{{ url_for('department') }}">
								<i class="ti-widget">&#10001</i>
								<p>部门管理</p>
							</a>
						</li>
                        <li>
							<a href="{{ url_for('post') }}">
								<i class="ti-widget">&#10001</i>
								<p>岗位管理</p>
							</a>
						</li>
						<li>
							<a href="{{ url_for('staff') }}">
								<i class="ti-widget">&#10001</i>
								<p>员工入职信息</p>
							</a>
						</li>
						<li>
							<a href="{{ url_for('staff_information') }}">
								<i class="ti-widget">&#10001</i>
								<p>员工信息中心</p>
							</a>
						</li>
					{% else %}
						<li>
							<a href="{{ url_for('login') }}">
								<i class="ti-widget">&#9819</i>
								<p>登录</p>
							</a>
						</li>
						<li>
							<a href="{{ url_for('logging') }}">
								<i class="ti-widget">&#9812</i>
								<p>注册</p>
							</a>
						</li>
					{% endif %}
					{% if current_user.has_role('Admin') or current_user.has_role('Root') %}
                        <li>
							<a href="{{ url_for('report_form') }}">
								<i class="ti-widget">&#10001</i>
								<p>部门报表管理</p>
							</a>
						</li>
						<li>
							<a href="{{ url_for('staff_dimission') }}">
								<i class="ti-widget">&#10001</i>
								<p>离职管理</p>
							</a>
						</li>
                        <li>
							<a href="{{ url_for('probation') }}">
								<i class="ti-widget">&#10001</i>
								<p>试用期管理</p>
							</a>
						</li>
					{% endif %}
					{% if current_user.has_role('Root') %}
						<li>
							<a href="{{ url_for('user_role') }}">
								<i class="ti-widget">&#10001</i>
								<p>用户权限管理</p>
							</a>
						</li>
					{% endif %}

				</ul>

            </div>
        </div>

	<div class="main-panel">

            <nav class="navbar navbar-default">
                <div class="container-fluid">
                    <div class="navbar-header">
                        {% block title %}
                        <a class="navbar-brand" href="#"> Data-Table </a>
                        {% endblock %}
                    </div>
					{% if current_user.is_authenticated%}
					<div class="collapse navbar-collapse">
                        <ul class="nav navbar-nav navbar-right">
                            {% block write %}{% endblock %}
							<li>
                                <a href="{{ url_for('logout') }}" class="btn btn-simple btn-info btn-icon like" data-toggle="dropdown">
                                    登出
                                </a>
                            </li>
						</ul>
					</div>
					{% endif %}
                </div>
            </nav>
            {% block div %}
            <div class="content">
            {% endblock %}
                <div class="container-fluid">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="card">
							{% block content %}
                                <div class="content">
                                    <h4 class="title">DataTables.net</h4>
                                    <div class="toolbar">
                                        <!--        Here you can write extra buttons/actions for the toolbar              -->
                                    </div>
                                    <div class="material-datatables">
                                        <table id="datatables" class="table table-striped table-no-bordered table-hover" style="width:100%;cellspacing:0">
                                            <thead>
                                                <tr>
                                                    <th>Name</th>
                                                    <th>Position</th>
                                                    <th>Office</th>
                                                    <th>Age</th>
                                                    <th>Date</th>
                                                    <th class="disabled-sorting text-right">Actions</th>
                                                </tr>
                                            </thead>
											
                                            <tbody>
												<tr>
													<td>{# 填充 #}</td>
												</tr>
                                                <tr>
                                                    <td>Tiger Nixon</td>
                                                    <td>System Architect</td>
                                                    <td>Edinburgh</td>
                                                    <td>61</td>
                                                    <td>2011/04/25</td>
                                                    <td class="text-right">
														<a href="#" class="btn btn-simple btn-info btn-icon like"><i class="ti-heart"></i></a>
														<a href="#" class="btn btn-simple btn-warning btn-icon edit"><i class="ti-pencil-alt"></i></a>
														<a href="#" class="btn btn-simple btn-danger btn-icon remove"><i class="ti-close"></i></a>
                                                    </td>
                                                </tr>
                                            </tbody>
                                           
                                        </table>
                                    </div>
                                </div>
							{% endblock %}
                                <!-- end content-->
                            </div>
                            <!--  end card  -->
                        </div>
                        <!-- end col-md-12 -->
                    </div>
                </div>
            </div>
    
			<footer class="footer">
                <div class="container-fluid">                     
                    <p class="copyright pull-right">
                        &copy;2020 -
                        <script>
                            document.write(new Date().getFullYear())
                        </script>
                        <a href="ttps://www.geekcat.xyz">一只胖橘</a>
                    </p>
                </div>
            </footer>
        </div>
    </div>
{% endblock %}
{% block login %}{% endblock %}
</body>
</html>